home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJTST200.ZIP / tests / libc / posix / sys / stat / stat.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-23  |  345 b   |  21 lines

  1. #include <stdio.h>
  2. #include <time.h>
  3. #include <sys/stat.h>
  4.  
  5. void
  6. djstat(char *f)
  7. {
  8.   struct stat s;
  9.   stat(f, &s);
  10.   printf("%d.%d %10d %24.24s %s\n", s.st_dev, s.st_ino, s.st_size, asctime(localtime(&s.st_mtime)), f);
  11. }
  12.  
  13. int
  14. main(int argc, char **argv)
  15. {
  16.   int i;
  17.   for (i=1; i<argc; i++)
  18.     djstat(argv[i]);
  19.   return 0;
  20. }
  21.